import requests
from api import ihrm_get_token



class IhrmAddUser(object):
    url = "https://ihrm-java.itheima.net/api/sys/user"
    logintoken = ihrm_get_token.IhrmGetToken()
    headers = {"content-type": "application/json", "Authorization": logintoken}
    @classmethod
    def get_adduser(cls,json_data):
        resp = requests.post(url=cls.url,headers=cls.headers,
                               json=json_data
                             )
        return resp

if __name__ == '__main__':
    print(IhrmAddUser.get_adduser({
        "username": "廖皮猪",
        "mobile": "13783203802",
        "workNumbeer": "63840",
        "departmentId": "1066239913642561536"
    }).json())





#

